import type { App } from 'vue'

// import { AButton } from '@/components/button/index'

import {
  Button,
  Cell,
  ConfigProvider,
  Icon,
  Image as VanImage,
  Col,
  Row,
  Popup,
  Toast,
  Calendar,
  Cascader,
  Checkbox,
  CheckboxGroup,
  DatetimePicker,
  Field,
  CellGroup,
  Form,
  NumberKeyboard,
  PasswordInput,
  Picker,
  RadioGroup,
  Radio,
  Search,
  Slider,
  Stepper,
  Switch,
  Dialog,
  Loading,
  Overlay,
  Empty,
  Divider,
  CountDown,
  Progress,
  Sticky,
  Grid,
  GridItem,
  Notify,
  Tab,
  Tabs,
  Uploader

} from 'vant'

import 'vant/lib/index.css';

export function setupVant(app: App<Element>) {
  // app.component('AButton', AButton)

  app
    .use(Button)
    .use(Cell)
    .use(ConfigProvider)
    .use(Icon)
    .use(VanImage)
    .use(Col)
    .use(Row)
    .use(Popup)
    .use(Toast)
    .use(Calendar)
    .use(Cascader)
    .use(Checkbox)
    .use(CheckboxGroup)
    .use(DatetimePicker)
    .use(Field)
    .use(CellGroup)
    .use(Form)
    .use(NumberKeyboard)
    .use(PasswordInput)
    .use(Picker)
    .use(RadioGroup)
    .use(Radio)
    .use(Search)
    .use(Slider)
    .use(Stepper)
    .use(Switch)
    .use(Dialog)
    .use(Loading)
    .use(Overlay)
    .use(Empty)
    .use(Divider)
    .use(CountDown)
    .use(Progress)
    .use(Sticky)
    .use(Grid)
    .use(GridItem)
    .use(Notify)
    .use(Tab)
    .use(Tabs)
    .use(Uploader)
}

Notify.setDefaultOptions({
  className: 'default-new-notify'
})

Dialog.setDefaultOptions({
  className: 'default-new-dialog',
  overlay: false
})
